/* 好友页面样式 */
.friends-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  background: linear-gradient(135deg, #f6f9fc 0%, #eef2f6 100%);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.friends-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.friends-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.header-title {
  margin: 0;
  color: #333;
  font-size: 28px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.requests-btn,
.add-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.requests-btn {
  background-color: #ff4d4f;
  color: white;
}

.requests-btn:hover {
  background-color: #e03939;
}

.add-btn {
  background-color: #1890ff;
  color: white;
}

.add-btn:hover {
  background-color: #1370c3;
}

.btn-icon {
  font-size: 18px;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.friend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.friend-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.friend-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  margin-right: 16px;
  position: relative;
  overflow: hidden;
}

.avatar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  color: #333;
  z-index: 1;
}

.online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #4caf50;
  border: 2px solid #ffffff;
  z-index: 2;
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-weight: bold;
  margin-bottom: 4px;
  color: #333;
  font-size: 18px;
  transition: color 0.3s ease;
}

.friend-item:hover .friend-name {
  color: #1890ff;
}

.friend-status {
  font-size: 14px;
  color: #888888;
  transition: color 0.3s ease;
}

.friend-item:hover .friend-status {
  color: #1890ff;
}

.friend-actions {
  display: flex;
  gap: 8px;
}

.chat-btn,
.delete-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.chat-btn {
  background-color: #1890ff;
  color: white;
}

.chat-btn:hover {
  background-color: #1370c3;
}

.delete-btn {
  background-color: #ff4d4f;
  color: white;
}

.delete-btn:hover {
  background-color: #e03939;
}

.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.dialog-content {
  background-color: white;
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.3s ease-out;
  position: relative;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.dialog-title {
  margin: 0;
  color: #333;
  font-size: 22px;
  font-weight: bold;
}

.close-icon {
  background-color: #f5f5f5;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: #888;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.close-icon:hover {
  background-color: #e0e0e0;
  color: #555;
}

.search-section {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #f0f2f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.search-icon {
  font-size: 20px;
  color: #888;
  margin-right: 10px;
}

.search-input {
  width: 100%;
  border: none;
  background-color: transparent;
  font-size: 16px;
  color: #333;
  outline: none;
}

.search-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #7B68EE 0%, #9370DB 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.3s ease;
}

.search-btn:hover {
  background: linear-gradient(135deg, #6A5ACD 0%, #8A2BE2 100%);
  transform: translateY(-1px);
}

.search-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 16px;
  background-color: #f9f9f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-info {
  display: flex;
  align-items: center;
  flex: 1;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7B68EE 0%, #9370DB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
  margin-right: 15px;
  position: relative;
  overflow: hidden;
}

.user-avatar .avatar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  color: white;
  z-index: 1;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  margin-bottom: 4px;
}

.user-id {
  font-size: 12px;
  color: #888;
}

.add-friend-btn {
  padding: 6px 12px;
  background: linear-gradient(135deg, #7B68EE 0%, #9370DB 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.3s ease;
}

.add-friend-btn:hover {
  background: linear-gradient(135deg, #6A5ACD 0%, #8A2BE2 100%);
  transform: translateY(-1px);
}

.no-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: #888;
  font-size: 16px;
}

.no-result-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.no-result-text {
  font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .friends-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .search-section {
    flex-direction: column;
  }
  
  .search-btn {
    width: 100%;
  }
  
  .friend-item {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .friend-actions {
    width: 100%;
    justify-content: space-between;
  }
} 